package ace.module.stock.core.impl.controller.rest.rpc;

import ace.cmp.rest.spring.data.jdbc.querydsl.core.controller.sdk.AbstractSdkRestController;
import ace.cmp.security.oauth2.resource.server.core.annotation.PreAuthorizeIsInternalClient;
import ace.module.common.api.annotation.ApiRemoteImplementPriority;
import ace.module.stock.api.WmsStockApi;
import ace.module.stock.api.model.dto.WmsStockDto;
import ace.module.stock.core.impl.dao.entity.WmsStock;
import ace.module.stock.sdk.core.feign.impl.WmsStockFeign;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import lombok.experimental.Delegate;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 库存 rpc controller.
 *
 * @author Caspar
 */
@Tag(name = "库存-RPC-API")
@PreAuthorizeIsInternalClient
@AllArgsConstructor
@RestController
@RequestMapping(WmsStockFeign.PATH)
@ApiRemoteImplementPriority
public class WmsStockRpcController
    extends AbstractSdkRestController<WmsStock, Long, WmsStockDto>
    implements WmsStockFeign {

  @Delegate
  private final WmsStockApi wmsStockApi;

}